{% extends 'dashboard/base.html' %}
{% block body %}

        <div class="row justify-content-md-center">
            <div class="col-8">
                <div class="card">
                    <div class="card-body">
                        <div class="d-md-flex align-items-center">
                            <h1 class="card-title">JIRA Ticket</h1>
                        </div>
                        <br>
                        <div class="card">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="card">
                                        <form class="form-horizontal" method="POST"
                                              action="{% url 'jiraticketing:submit_jira_ticket' %}">{% csrf_token %}
                                            <input name="vuln_id" value="{{vuln_id}}" type="hidden">
                                            <input name="scanner" value="{{scanner}}" type="hidden">
                                            <input name="scan_id" value="{{scan_id}}" type="hidden">
                                            <div class="card-body">
                                                <div class="form-group row">
                                                    <label
                                                            class="col-sm-4 col-form-label">Select Project</label>
                                                    <div class="col-sm-6">
                                                        <select id="project_id" name="project_id"
                                                                class="select2 form-control custom-select"
                                                                style="width: 100%; height:36px;">
                                                            {% for jira_data in jira_projects %}
                                                            <option value="{{jira_data.id}}">{{ jira_data.name }}
                                                            </option>
                                                            {% endfor %}
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group row">
                                                    <label
                                                            class="col-sm-4 col-form-label">Issue Type</label>
                                                    <div class="col-sm-6">
                                                        <select name="issue_type"
                                                                class="select2 form-control custom-select"
                                                                style="width: 100%; height:36px;">
                                                            <option>Bug</option>
                                                            <option>Story</option>

                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group row">
                                                    <label
                                                            class="col-sm-4 col-form-label">Summary</label>
                                                    <div class="col-sm-6">
                                                        <input type="text" name="summary"
                                                               class="form-control"
                                                               value="{{summary}}">
                                                    </div>
                                                </div>
                                                <div class="form-group row">
                                                    <label
                                                            class="col-sm-4 col-form-label">Description</label>
                                                    <div class="col-sm-6">
                                                        <textarea name="description" class="form-control">{{description}}</textarea>
                                                    </div>
                                                </div>
                                                <button type="submit" class="btn btn-success">Save</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


{% endblock %}